#include <iostream>
#include <string>

using namespace std;

class Solution 
{
public:
	string convert(string s, int nRows) 
	{
		// Start typing your C/C++ solution below
		// DO NOT write int main() function    
		if(s.empty())
			return "";
		else if(nRows <= 1)
			return s;

		int nnSec = 2*nRows-2;
		int nSec = s.size()/nnSec;
		nSec += (s.size()%nnSec>0);

		string result(s.size(),' ');
		int rIdx = 0;
		for(int i=0;i<nRows;i++)
		{
			if(i>0 && i<(nRows-1))
			{
				for(int j=0,idx1 = i,idx2=nnSec-i;j<nSec;j++,idx1+= nnSec,idx2+=nnSec)
				{
					if(idx1<s.size())
						result[rIdx++] = s[idx1];
					if(idx2<s.size())
						result[rIdx++] = s[idx2];
				}
			}
			else
			{
				for(int j=0, curIdx=i;j<nSec;j++,curIdx+=nnSec)
				{
					if(curIdx<s.size())
						result[rIdx++] = s[curIdx];
				}
			}
		}        

		return result;
	}
};

int main()
{
	int n;
	Solution s;
	while(cin>>n)
	{
		if(n<=0)
			break;
		while(cin.get() != '\n');
		string line;
		getline(cin,line);
		cout<<s.convert(line,n)<<endl;
	}
}